
<template>
  <div class="main-con">
    <div class="top">
      <div class="monitor-wrapper">
        <div class="monitor-header">
          <img src="@/assets/cleaning/load-icon.png" class="load-icon" />
          <img src="@/assets/cleaning/structure.png" class="structure" />
          <img src="@/assets/cleaning/tip.png" class="tip" />
        </div>
      </div>
    </div>
    <div class="bottom">
      <div class="left">
        <TitleWithBg title="喷墨划线运行状态" hasIcon />
        <ContentContainer :barTop="21">
          <slot>
            <div class="content">
              <div class="status">
                <Status title="激光器状态" status="正常" />
                <Status title="激光水冷器温度状态" status="正常" />
                <Status title="喷墨划线工作状态" status="正常" />
              </div>
              <div class="middle-content">
                <div class="left-item">
                  <Status title="激光清洗板料计数" status="" />
                  <div class="count-circle">
                    <span>199</span>
                  </div>
                </div>
                <div class="right-item">
                  <Status
                    title="激光烟雾吸尘器工作状态"
                    status="正常"
                    type="row"
                  />
                  <Status
                    title="板料视觉边轮廓识别装置工作状态"
                    status="正常"
                    type="row"
                  />
                  <Status
                    title="板料视觉边轮廓识别装置是否修正"
                    status="正常"
                    type="row"
                  />
                </div>
              </div>
              <div class="bottom-content">
                <div class="left-content">
                  <BarItem
                    title="激光清洗头位置（X轴位置）"
                    :num="'12m'"
                    color="#24EACD"
                  />
                  <BarItem
                    title="激光清洗头位置（Y轴位置）"
                    :num="'62m'"
                    color="#FFFA92"
                  />
                  <BarItem
                    title="激光清洗头位置（Z轴位置）"
                    :num="'12m'"
                    color="#13E7FF"
                  />
                  <BarItem
                    title="激光清洗头位置（C轴位置）"
                    :num="'13m'"
                    color="#00B5FF"
                  />
                  <BarItem
                    title="激光清洗与划线速度 (进给速度)"
                    :num="'28m/s'"
                    color="#35CCFF"
                  />
                </div>
                <div class="right-content">
                  <Status
                    title="激光清洗设定宽度"
                    status="18.4m"
                    align="left"
                  />
                  <Status title="墨水（墨盒）寿命" status="20Y" align="left" />
                  <Status
                    title="喷墨划线设定划线宽度"
                    status="18.4m"
                    align="left"
                  />
                  <Status title="激光器功率" status="18w" align="left" />
                </div>
              </div>
            </div>
          </slot>
        </ContentContainer>
      </div>
      <div class="right">
        <TitleWithBg title="浮动打磨运行状态" hasIcon />
        <ContentContainer :barTop="11">
          <slot>
            <div class="content">
              <div class="left">
                <div class="run-status">
                  <div class="inner">
                    <span>正常</span>
                  </div>
                </div>
                <div class="work-status">湿式除尘器工作状态</div>
                <Status title="打磨片当前使用寿命" status="12 天" type="row" />
                <Status title="打磨片当前使用寿命" status="45 天" type="row" />
              </div>
              <div class="center">
                <Status title="打磨头位置" type="row" />
                <div class="position">
                  <BarItem
                    title="y位置："
                    num="85m"
                    type="row"
                    color="#F16060"
                    hideBar
                  />
                  <BarItem
                    title="z位置："
                    num="85m"
                    type="row"
                    color="#F2A90E"
                    hideBar
                  />
                  <BarItem
                    title="c位置："
                    num="85m"
                    type="row"
                    color="#13E7FF"
                    hideBar
                  />
                </div>
              </div>
              <div class="center">
                <Status title="打磨主轴转速" type="row" />
              </div>
            </div>
          </slot>
        </ContentContainer>
        <TitleWithBg title="物流线运行状态" hasIcon />
        <div class="flex row">
          <Status
            :title="`物流线-${index + 1}`"
            status="有料"
            v-for="(item, index) in materialFlows"
            :key="index"
            align="left"
          />
        </div>
        <div class="flex row">
          <Status
            :title="`变频器-${index + 1}`"
            status="停止"
            v-for="(item, index) in transducer"
            :key="index"
            align="left"
          />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import TitleWithBg from "@/components/loading-station/title-with-bg.vue";
import Status from "@/components/loading-station/status.vue";
import ContentContainer from "@/components/loading-station/content-container.vue";
import BarItem from "@/components/loading-station/barItem.vue";
export default {
  name: "Inspect",
  components: {
    TitleWithBg,
    Status,
    ContentContainer,
    BarItem,
  },
  data() {
    return {
      materialFlows: new Array(10),
      transducer: new Array(14),
    };
  },
};
</script>
<style lang="scss" scoped>
.main-con {
  flex: 1;
  background-image: url(../../../assets/images/screen-bg.png);
  background-size: 100%;
  padding: 10px;
  display: flex;
  margin-bottom: 10px;
  flex-direction: column;
  padding-bottom: 20px;
  .top {
    width: 100%;
    height: 240px;
    min-height: 240px;
    position: relative;
    .monitor-wrapper {
      position: absolute;
      left: 20px;
      right: 20px;
      top: 0;
      width: calc(100% - 50px);
      bottom: 0;
      z-index: 3;
      .monitor-header {
        display: flex;
        width: 100%;
        .load-icon {
          margin-left: 15px;
          margin-top: 17px;
          width: 71px;
          height: 23px;
        }
        .structure {
          flex-grow: 1;
          width: 100%;
          height: 187px;
        }
        .tip {
          width: 41px;
          height: 40px;
          margin-top: 12px;
        }
      }
      .monitor-status {
        display: flex;
        margin: 10px 12px;
        &-item {
          width: 32%;
          position: relative;
          &-title {
            font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
            font-weight: 500;
            font-size: 14px;
            color: #ffffff;
            text-align: left;
            font-style: normal;
            position: absolute;
            left: 52px;
            top: 2px;
          }
          .timer {
            position: absolute;
            right: 10px;
            bottom: 0px;
            font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
            font-weight: 400;
            font-size: 8px;
            color: #ffffff;
            line-height: 22px;
            text-align: left;
            font-style: normal;
          }
        }
        .status-title-img {
          width: 100%;
          height: 30px;
        }
      }
      .monitor-count {
        display: flex;
        margin: 0 12px;
        &-item {
          width: 313px;
          margin-right: 10px;
          position: relative;
          .count-img {
            width: 100%;
            height: 45px;
          }
          &-title {
            font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
            font-weight: 500;
            font-size: 13px;
            color: #ffffff;
            line-height: 45px;
            text-align: left;
            font-style: normal;
            display: flex;
            justify-content: space-between;
            position: absolute;
            left: 0;
            right: 0;
            padding: 0 13px;
            top: 0;
            .num {
              font-family: DINAlternate, DINAlternate;
              font-weight: bold;
              font-size: 18px;
              color: #69d9fe;
              text-align: center;
              font-style: normal;
              text-transform: none;
            }
          }
        }
      }
    }
  }
  .bottom {
    flex: 1;
    display: flex;
    .left,
    .right {
      flex: 1;
      display: flex;
      flex-direction: column;
      ::v-deep .title-con {
        width: 646px;
        margin-bottom: 10px;
      }
      .content {
        flex: 1;
        display: flex;
        flex-direction: column;
      }
      ::v-deep .content-container {
        margin-left: 40px;
      }
    }
    .left {
      ::v-deep .title-con span {
        padding-left: 100px;
      }
      .status {
        display: flex;
        justify-content: space-around;
      }
    }
    .right {
      ::v-deep .title-con {
        margin-left: 30px;
        span {
          padding-left: 55px;
        }
      }
      ::v-deep .content-container {
        height: 271px;
      }
      .flex {
        display: flex;
        padding: 10px 20px 10px 50px;
        flex-wrap: wrap;
        .item {
          width: 10%;
          margin-bottom: 20px;
          ::v-deep {
            .title {
              font-size: 14px;
            }
            .status {
              font-size: 18px;
            }
          }
        }
      }
      .content {
        padding: 20px;
        display: flex;
        flex-direction: row;
        .left {
          width: 30%;
          min-width: 30%;
          .run-status {
            width: 183.01px;
            height: 118px;
            background: url(../../../assets/images/run-bg.png);
            background-size: 100%;
            background-repeat: no-repeat;
            .inner {
              width: 70%;
              height: 100%;
              background: url(../../../assets/images/normal-bg.png);
              background-size: 100%;
              margin: auto;
              font-size: 20px;
              color: #ffffff;
              font-weight: 500;
              display: flex;
              justify-content: center;
              align-items: center;
            }
          }
          .work-status {
            font-size: 20px;
            color: #ffffff;
            margin: 10px 0;
          }
          ::v-deep .item {
            width: 100%;
            align-items: center;
            justify-content: space-between;
            .title {
              font-size: 16px;
            }
            .status {
              font-size: 21px;
            }
          }
        }
        .center {
          width: 40%;
          padding: 10px 30px;
        }
      }
    }
    .middle-content {
      display: flex;
      padding: 30px 30px;
      .left-item {
        width: 30%;
        display: flex;
        align-items: center;
        flex-direction: column;
        .count-circle {
          background: url(../../../assets/images/trans-circle.png);
          background-size: 100%;
          width: 104px;
          height: 104px;
          display: flex;
          align-items: center;
          justify-content: center;
          span {
            color: #44e1ff;
            font-size: 24px;
          }
        }
      }
      .right-item {
        flex: 1;
        .item {
          align-items: center;
          justify-content: space-between;
          margin-bottom: 20px;
          ::v-deep .status {
            font-size: 20px;
          }
        }
      }
    }
    .bottom-content {
      display: flex;
      flex: 1;
      .left-content {
        width: 60%;
        padding-left: 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding-bottom: 40px;
      }
      .right-content {
        padding-left: 30px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding-bottom: 20px;
        ::v-deep .status {
          color: #ffeda8;
        }
      }
    }
  }
}
@media screen and (max-width: 1600px) {
  .main-con .bottom .middle-content {
    padding: 0 30px;
    max-height: calc(100% - 240px);
  }
}
</style>